<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLiveRoomTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('live_room', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->default('')->comment('直播');
            $table->string('anchor')->default('')->comment('主播名称');
            $table->string('room_no')->default('')->comment('房间号');
            $table->string('room_cover')->default('')->comment('直播间封面图');
            $table->tinyInteger('status')->default('1')->comment('直播间状态 0:未直播,1直播中');
            $table->dateTime('start_time')->comment('开播时间');
            $table->dateTime('end_time')->nullable()->comment('结束时间');
            $table->string('push_url')->nullable()->comment('推流地址');
            $table->string('pull_url')->nullable()->comment('播流地址');
            $table->string('playback_url')->nullable()->comment('回放地址');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('live_room');
    }
}
